$(function () {
    setRem();
    window.addEventListener('resize', setRem)
    window.addEventListener('orientationchange', setRem);

    function setRem() {
        var html = document.querySelector('html');
        //console.log(html.getBoundingClientRect());
        var width = html.getBoundingClientRect().width;
        html.style.fontSize = 100 * width / 750 + 'px';
    };
})